﻿using System;

namespace _7
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] a = new int[9] {20,16,78,61,12,99,57,34,8};
            for(int i = 0; i < 9; i++)
            {
                for (int j = 0; j < 8 - i; j++)
                {
                    if (a[j] > a[j + 1])
                    {
                        a[j] = a[j] + a[j + 1];
                        a[j + 1] = a[j] - a[j + 1];
                        a[j] = a[j] - a[j + 1];
                    }
                }
            }
            for(int i = 0; i < 9; i++)
            {
                Console.Write($"{a[i]} ");
            }
        }
    }
}
